import math
import random
from starfield.Entity import Entity
from starfield import NameGenerator
from mathutils import Vector

class Moon(Entity):
	def __init__(self, name, location = Vector([0.0, 0.0, 0.0])):
		
		Entity.__init__(self, location)
		
		try:
			self.id = starfield.GameMaster.get_new_id()
		except:
			pass
			
		self.location = location
		self.name = name
		self.mass = random.randint(50, 100)
		self.planet = -1
		
		self.game_object = 0
		
		# nice to know what I am #
		self.role = "moon"
		
	def update(self, time):
		Entity.update(self, time)
		if self.game_object != 0:
			self.game_object.position = self.location